Closing Link Module

I am trying to put a simple script together to close link modules upon either closing a module (trigger) or just through a menu option. The problem we are having is that the Clear Suspect Link tool in DOORS 8.3 has a bug and does not release the link module after finishing the operation/closign the module you cleared the suspect links from. The problem I am having with is that the linkmodule still being referenced by the module somehow, and is not really closing.

Any ideas?

----
string ReqlnkID = "00002347" //UniqueID of the System Requirements LinkModule
bool req = false

Item i = itemFromID(ReqlnkID)

//checks if the LinkModule is open on any state and closes it saving changes.
if (open module fullName i) {
req = true
unload(module i) //unload current linkset on module
close (module i, true) //save & close module
}
Calnan - Tue Apr 27 09:46:01 EDT 2010

Re: Closing Link Module
Mathias Mamsch - Wed Apr 28 03:56:01 EDT 2010

Hey Calnan,

the link module will stay open, when there is a module open, that has outlinks through the link module. May it be the case that you need to close a formal module using that link module first?

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and DOORS

Re: Closing Link Module
llandale - Thu Apr 29 10:27:42 EDT 2010

For code I don't recall writing a long time ago, I see that I loop through all open Formal modules and attempt to close them; then loop again through open Formal modules and attempt to close them; and finally loop through all open link modules and attempt to close them. 'Attempt' means close but don't presume it worked.

There are 'refCount' and 'dxlLock' commands that show some promise, but I've never used them.

  • Louie